/* CSS变量定义 - 支持主题切换 */
:root {
    /* 浅色模式变量 */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #ecf0f1;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --navbar-bg: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --card-hover-bg: #f8f9fa;
    --input-bg: #ffffff;
    --input-border: #ddd;
    --input-focus: #3498db;
    --modal-bg: rgba(0, 0, 0, 0.5);
    --code-bg: #f4f4f4;
    --code-text: #333;
}

/* 深色模式变量 */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #333333;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-light: #f8f9fa;
    --border-color: #404040;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-heavy: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #434343 0%, #000000 100%);
    --gradient-secondary: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --accent-color: #4a9eff;
    --accent-hover: #357abd;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --navbar-bg: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --card-hover-bg: #404040;
    --input-bg: #333333;
    --input-border: #555;
    --input-focus: #4a9eff;
    --modal-bg: rgba(0, 0, 0, 0.7);
    --code-bg: #2d2d2d;
    --code-text: #e0e0e0;
}

/* 基本重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: var(--navbar-bg);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-heavy);
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    color: var(--text-light);
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-color);
}

/* 主题切换按钮样式 */
.theme-toggle {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-light);
}

.theme-toggle:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

.theme-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

.theme-text {
    font-weight: 500;
}

/* 深色模式特定样式 */
[data-theme="dark"] .theme-icon {
    filter: brightness(1.2);
}

/* 深色模式下的额外优化 */
[data-theme="dark"] .hero-gradient {
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
}

[data-theme="dark"] .hero-particles {
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.15), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.15), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.2), transparent);
}

[data-theme="dark"] .language-selector {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .language-selector:hover {
    background: var(--accent-color);
    color: var(--text-light);
}

/* 主题切换通知样式 */
.theme-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-medium);
    border: 1px solid var(--border-light);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-icon {
    font-size: 16px;
}

.notification-text {
    font-weight: 500;
}

/* 语言选择器样式 */
.language-selector-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.language-selector {
    padding: 0.5rem;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    background: transparent;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector:hover {
    background: var(--accent-color);
    color: var(--text-light);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 3px 0;
    transition: 0.3s;
}

/* 主页英雄区域 */
.hero {
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: 120px 0 80px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    animation: gradientShift 10s ease-in-out infinite;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particlesMove 20s linear infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes particlesMove {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-100px); }
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
    color: var(--text-light);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
    color: var(--text-light);
}

.cta-button {
    background: var(--gradient-accent);
    color: var(--text-light);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button:hover {
    background: var(--gradient-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow-accent);
}

/* 关于我部分 */
.about {
    padding: 80px 0;
    background: var(--bg-secondary);
    position: relative;
    transition: background 0.3s ease;
}

.about-content {
    position: relative;
    z-index: 2;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-heading);
    position: relative;
    z-index: 2;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    position: relative;
    z-index: 2;
}

.intro-section {
    margin-bottom: 2.5rem;
}

.intro-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-heading);
    font-weight: 600;
}

.intro-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* 技能项目样式 */
.skill-item {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.skill-item:hover {
    background: var(--card-bg-hover);
    transform: translateX(5px);
    border-color: var(--border-accent);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.skill-header span:first-child {
    font-weight: 600;
    color: var(--text-heading);
    font-size: 16px;
}

.skill-percentage {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 14px;
}

/* 技能进度条动画 */
.progress-fill {
    width: 0;
    transition: width 1.5s ease-in-out;
}

.skill-item.in-view .progress-fill {
    width: var(--progress-width, 0);
}

.about-image {
    text-align: center;
}

/* 个人照片样式 */
.profile-image {
    text-align: center;
    position: relative;
}

.profile-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 15px 35px var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 5px solid var(--card-bg);
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px var(--shadow-heavy);
}

/* 时间线样式 */
.timeline {
    margin-bottom: 2.5rem;
}

.timeline h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-heading);
    font-weight: 600;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-accent);
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--accent-color);
}

.timeline-date {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-heading);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* 成就部分样式 */
.achievements {
    margin-bottom: 2rem;
}

.achievements h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.achievement-item {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.achievement-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.achievement-item h4 {
    font-size: 1rem;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes gradientRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 项目部分 */
.projects {
    padding: 80px 0;
    background: var(--bg-secondary);
    position: relative;
    transition: background 0.3s ease;
}

.projects .container {
    position: relative;
    z-index: 2;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.4) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.3) 0%, transparent 20%);
    pointer-events: none;
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-heading);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    border: 1px solid var(--border-light);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-medium);
    background-color: var(--card-bg-hover);
}

.project-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

/* 项目占位符样式 */
.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-bg-1 {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.project-bg-2 {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.project-bg-3 {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.project-icon {
    font-size: 48px;
    margin-bottom: 10px;
    z-index: 2;
    animation: bounce 2s infinite;
}

.project-title-overlay {
    font-size: 18px;
    font-weight: 600;
    color: white;
    text-align: center;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.project-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    z-index: 1;
}

.project-card:hover .project-placeholder::before {
    animation: shimmer 0.6s ease;
}

.project-card:hover .project-placeholder {
    transform: scale(1.05);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-heading);
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    background-color: var(--accent-color);
    color: var(--text-light);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.project-link:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

/* 联系部分 */
.contact {
    padding: 80px 0;
    background: var(--gradient-primary);
    color: var(--text-light);
    position: relative;
    transition: background 0.3s ease;
}

.contact .container {
    position: relative;
    z-index: 2;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-light);
    position: relative;
    z-index: 2;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 2;
}

.contact-item {
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 2;
}

/* 社交媒体部分样式 */
.social-media {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.social-media h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-weight: 600;
}

.social-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-link-vertical {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.social-link-vertical:hover {
    background-color: var(--card-bg-hover);
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.social-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
    color: var(--text-primary);
    position: relative;
    z-index: 2;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--card-bg-hover);
    box-shadow: 0 0 15px var(--shadow-accent);
}

.submit-button {
    background: var(--gradient-accent);
    color: var(--text-light);
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.submit-button:hover {
    background: var(--gradient-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-heavy);
}

/* 表单验证样式 */
.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

.form-group input.success,
.form-group textarea.success {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}

/* 错误消息样式 */
.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
    animation: slideDown 0.3s ease;
}

.error-message.show {
    display: block;
}

/* 表单状态消息 */
.form-status {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 5px;
    font-weight: 500;
    display: none;
    animation: slideDown 0.3s ease;
}

.form-status.show {
    display: block;
}

.form-status.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.form-status.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* 欢迎提示样式 */
.welcome-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1500;
    max-width: 300px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.toast-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.9;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.toast-close:hover {
    opacity: 1;
}

/* 技能详情模态框 */
.skill-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-detail-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.skill-detail-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
}

.skill-detail-info p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.skill-detail-info ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.skill-detail-info li {
    margin-bottom: 0.3rem;
}

.close-skill-modal {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    width: 100%;
    transition: background 0.3s ease;
}

.close-skill-modal:hover {
    background: #2980b9;
}

/* 提交按钮样式增强 */
.submit-button {
    position: relative;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 按钮内的加载动画 */
.submit-button .loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* 页脚 */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 10%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

footer .container {
    position: relative;
    z-index: 2;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid white;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: white;
    color: #2c3e50;
}

/* 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .language-selector-item {
        flex-direction: column;
        gap: 0.3rem;
    }

    .language-label {
        color: #ecf0f1;
    }

    .language-selector {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #3498db;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .profile-image {
        width: 250px;
        height: 250px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-list {
        grid-template-columns: 1fr;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功提示 */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
    display: none;
}

.success-message.show {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

/* 错误提示 */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
    display: none;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-in;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #000;
}

/* 技术徽章 */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.tech-badge {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tech-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 功能列表 */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.feature-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #2c3e50;
    font-size: 15px;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 16px;
}

/* 项目链接按钮 */
.project-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-github {
    background: linear-gradient(135deg, #24292e, #1a1e22);
    color: white;
}

.btn-github:hover {
    background: linear-gradient(135deg, #1a1e22, #15181b);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-demo {
    background: linear-gradient(135deg, #27ae60, #219653);
    color: white;
}

.btn-demo:hover {
    background: linear-gradient(135deg, #219653, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 模态框标题 */
.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 24px;
}

.modal-content h4 {
    color: #34495e;
    margin: 20px 0 10px 0;
    font-size: 18px;
}

.modal-content p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: center;
}

/* 进度条 */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    width: 0;
    transition: width 1.8s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(52, 152, 219, 0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .about,
    .projects,
    .contact {
        padding: 60px 0;
    }

    .about h2,
    .projects h2,
    .contact h2 {
        font-size: 2rem;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    .project-links {
        flex-direction: column;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }
}